from selenium.webdriver.common.by import By

from base import Base
class Page(Base):
    # 搜索框
    def k(self):
        ele=(By.XPATH,'//android.widget.ViewSwitcher[@resource-id="com.achievo.vipshop:id/index_search_custom_hint"]/android.widget.RelativeLayout')
        loc=self.find_ele(ele)
        return loc
    # 输入文字的框
    def k2(self):
        ele=(By.CLASS_NAME,'android.widget.EditText')
        loc=self.find_ele(ele)
        return loc
    # 搜索按钮
    def anniu(self):
        ele=(By.ID,'com.achievo.vipshop:id/tv_search')
        loc=self.find_ele(ele)
        return loc
    # 断言“重试”
    def duanyan(self):
        ele = (By.ID, 'com.achievo.vipshop:id/btn_refresh')
        loc = self.find_ele(ele)
        return loc